import request from '@/utils/request'

// 创建表动态配置字段展示
export function createFieldDynamicsConfig(data) {
  return request({
    url: '/vote/field-dynamics-config/create',
    method: 'post',
    data: data
  })
}

// 更新表动态配置字段展示
export function updateFieldDynamicsConfig(data) {
  return request({
    url: '/vote/field-dynamics-config/update',
    method: 'put',
    data: data
  })
}

// 删除表动态配置字段展示
export function deleteFieldDynamicsConfig(id) {
  return request({
    url: '/vote/field-dynamics-config/delete?id=' + id,
    method: 'delete'
  })
}

// 获得表动态配置字段展示
export function getFieldDynamicsConfig(id) {
  return request({
    url: '/vote/field-dynamics-config/get?id=' + id,
    method: 'get'
  })
}

// 获得表动态配置字段展示分页
export function getFieldDynamicsConfigPage(query) {
  return request({
    url: '/vote/field-dynamics-config/page',
    method: 'get',
    params: query
  })
}

// 导出表动态配置字段展示 Excel
export function exportFieldDynamicsConfigExcel(query) {
  return request({
    url: '/vote/field-dynamics-config/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
